import React, { createContext, useContext, useState, useEffect, ReactNode } from 'react';

type Language = 'en' | 'zh-CN';

interface LanguageContextType {
  language: Language;
  setLanguage: (lang: Language) => void;
  t: (key: string) => any;
}

const LanguageContext = createContext<LanguageContextType | undefined>(undefined);

interface LanguageProviderProps {
  children: ReactNode;
}

export const LanguageProvider: React.FC<LanguageProviderProps> = ({ children }) => {
  const [language, setLanguageState] = useState<Language>('en');

  useEffect(() => {
    // Check localStorage for saved language preference
    const savedLanguage = localStorage.getItem('language') as Language;
    if (savedLanguage && (savedLanguage === 'en' || savedLanguage === 'zh-CN')) {
      setLanguageState(savedLanguage);
    }
  }, []);

  const setLanguage = (lang: Language) => {
    setLanguageState(lang);
    localStorage.setItem('language', lang);
  };

  const t = (key: string): any => {
    const keys = key.split('.');
    let value: any = translations[language];
    
    for (const k of keys) {
      if (value && typeof value === 'object') {
        value = value[k];
      } else {
        return key; // Return key if translation not found
      }
    }
    
    return value !== undefined ? value : key;
  };

  return (
    <LanguageContext.Provider value={{ language, setLanguage, t }}>
      {children}
    </LanguageContext.Provider>
  );
};

export const useLanguage = () => {
  const context = useContext(LanguageContext);
  if (!context) {
    throw new Error('useLanguage must be used within a LanguageProvider');
  }
  return context;
};

// Translation object
const translations: Record<Language, any> = {
  en: {
    nav: {
      products: 'Products',
      pricing: 'Pricing',
      documentation: 'Documentation',
      blog: 'Blog',
      support: 'Support',
      login: 'Login',
      register: 'Register',
      pricingMenu: {
        dynamic: {
          title: 'Dynamic Residential IPv6',
          subtitle: 'Pay by traffic',
        },
        static: {
          title: 'Static Residential IPv6',
          subtitle: 'Pay by IP count and duration',
        },
        datacenter: {
          title: 'Datacenter IPv6',
          subtitle: 'Cost-effective choice',
        },
      },
    },
    home: {
      hero: {
        title: {
          line1: 'Kernel-Level Performance,',
          line2: 'Unleashing Unlimited IPv6 Potential'
        },
        subtitle: 'Built on a pure IPv6 backbone network, providing stable, high-speed, and anonymous proxy services, optimized for data collection, SEO monitoring, and ad verification.',
        getStarted: 'Get Started',
        viewPricing: 'View Pricing',
      },
      stats: {
        proxyIPs: 'Proxy IPs Online',
        countries: 'Countries/Regions',
        bandwidth: 'Today\'s Bandwidth',
      },
      features: {
        title: 'Why Choose kernelProxy',
        subtitle: 'Our proxy service is renowned for exceptional performance and reliability, providing robust support for enterprise-level data needs',
        global: {
          title: 'Global Coverage',
          description: 'IPv6 native network spanning 50+ countries, providing proxy services from any region worldwide',
        },
        performance: {
          title: 'Ultimate Performance',
          description: 'Kernel-level optimization, millisecond response, 99.9% availability guarantee, providing stable support for your business',
        },
        easeOfUse: {
          title: 'Easy to Use',
          description: 'Intuitive control panel and complete API documentation, making it easy to integrate and manage proxy resources',
        },
      },
      useCases: {
        title: 'Use Cases',
        subtitle: 'kernelProxy is suitable for various business scenarios',
        dataCollection: {
          title: 'Data Collection',
          items: [
            'E-commerce price monitoring',
            'Social media data analysis',
            'Market research',
            'Competitor analysis',
          ],
        },
        seo: {
          title: 'SEO Monitoring',
          items: [
            'Search engine ranking',
            'Rank tracking',
            'Localized search results analysis',
            'Competitor monitoring',
          ],
        },
        adVerification: {
          title: 'Ad Verification',
          items: [
            'Ad display verification',
            'Different region ad content checking',
            'Competitor ad strategy analysis',
          ],
        },
      },
      testimonials: {
        title: 'Customer Reviews',
        subtitle: 'Learn how our customers use kernelProxy to improve business efficiency',
        customer1: {
          name: 'Mr. Zhang',
          position: 'CTO, Data Analytics Company',
          review: 'The stability of kernelProxy is impressive. Over the past six months, we\'ve made over 500 million data requests with almost no issues. The extensive IPv6 coverage also provides great convenience for our global data collection.',
        },
        customer2: {
          name: 'Ms. Li',
          position: 'SEO Consultant',
          review: 'As an SEO consultant, I need to view client search rankings from different regions. kernelProxy\'s geolocation proxies allow me to accurately view search results in different markets, and the API is very easy to integrate into our monitoring tools.',
        },
      },
      cta: {
        title: 'Ready to Get Started?',
        subtitle: 'Register an account and get 10 free proxy IPs to experience kernelProxy\'s powerful performance',
        freeTrial: 'Free Trial',
        viewPlans: 'View Plans',
      },
    },
    products: {
      hero: {
        title: 'IPv6 Proxy Solutions for Every Need',
        subtitle: 'Choose from our comprehensive range of IPv6 proxy services designed for different use cases and budget requirements'
      },
      'dynamic-residential': {
        title: 'Dynamic Residential IPv6',
        description: 'Rotating residential IPs with automatic rotation for maximum anonymity and success rate. Perfect for large-scale data collection and web scraping.',
        features: [
          'Real residential IP addresses',
          'Automatic IP rotation',
          'High success rate (>95%)',
          'Global coverage 50+ countries',
          'Pay as you go by traffic'
        ],
        useCases: [
          'Web Scraping',
          'Price Monitoring',
          'Ad Verification',
          'Market Research'
        ]
      },
      'static-residential': {
        title: 'Static Residential IPv6',
        description: 'Fixed residential IPs with long-term stability. Ideal for account management and services requiring consistent IP addresses.',
        features: [
          'Dedicated residential IPs',
          'Long-term stable IPs',
          'High trust score',
          'Session persistence',
          'Flexible rental periods'
        ],
        useCases: [
          'Account Management',
          'Social Media',
          'E-commerce',
          'Brand Protection'
        ]
      },
      datacenter: {
        title: 'Datacenter IPv6',
        description: 'High-speed datacenter IPs with excellent performance-to-cost ratio. Best for tasks requiring high bandwidth and speed.',
        features: [
          'Ultra-fast connection speeds',
          'Unlimited bandwidth',
          'Cost-effective pricing',
          'High concurrent connections',
          '99.9% uptime guarantee'
        ],
        useCases: [
          'SEO Monitoring',
          'Content Delivery',
          'API Testing',
          'Batch Operations'
        ]
      },
      useCases: 'Use Cases',
      viewPricing: 'View Pricing',
      comparison: {
        title: 'Product Comparison',
        subtitle: 'Find the perfect solution for your needs',
        feature: 'Feature',
        rows: [
          { feature: 'IP Type', dynamic: 'Residential', static: 'Residential', datacenter: 'Datacenter' },
          { feature: 'IP Rotation', dynamic: 'Automatic', static: 'Fixed', datacenter: 'Fixed' },
          { feature: 'Billing Model', dynamic: 'By Traffic', static: 'By IP & Duration', datacenter: 'By IP & Duration' },
          { feature: 'Success Rate', dynamic: '>95%', static: '>98%', datacenter: '>90%' },
          { feature: 'Speed', dynamic: 'Medium', static: 'Medium', datacenter: 'Very Fast' },
          { feature: 'Global Coverage', dynamic: true, static: true, datacenter: true },
          { feature: 'Concurrent Sessions', dynamic: 'High', static: 'Medium', datacenter: 'Very High' },
          { feature: 'Price', dynamic: 'Premium', static: 'High', datacenter: 'Budget' }
        ]
      },
      cta: {
        title: 'Ready to Get Started?',
        subtitle: 'Choose the plan that fits your needs and start using our premium IPv6 proxy network today',
        getStarted: 'Get Started Free',
        contactSales: 'Contact Sales'
      },
      dynamicResidential: {
        title: 'Dynamic Residential IPv6'
      },
      staticResidential: {
        title: 'Static Residential IPv6'
      }
    },
    pricing: {
      title: 'Simple and Transparent Pricing',
      subtitle: 'Choose the most suitable plan for your business needs, no hidden fees',
      billingTypes: {
        traffic: 'Traffic-Based',
        ip: 'IP-Based',
        enterprise: 'Enterprise Custom',
      },
      plans: {
        basic: {
          name: 'Basic',
          price: '¥149',
          period: '/month',
          description: 'Suitable for small data collection needs',
          features: [
            '100GB monthly traffic',
            '10 concurrent connections',
            '20 countries/regions',
            'Basic API access',
            'Email support',
          ],
        },
        pro: {
          name: 'Professional',
          price: '¥499',
          period: '/month',
          description: 'Suitable for medium enterprises and continuous data needs',
          popular: 'Most Popular',
          features: [
            '500GB monthly traffic',
            '50 concurrent connections',
            'All countries/regions',
            'Full API access',
            'Priority email support',
          ],
        },
        business: {
          name: 'Business',
          price: '¥1499',
          period: '/month',
          description: 'Suitable for large-scale data collection needs',
          features: [
            '2TB monthly traffic',
            '200 concurrent connections',
            'All countries/regions',
            'Full API access',
            '24/7 priority support',
          ],
        },
      },
      selectPlan: 'Select Plan',
      recommended: 'Recommended',
      buyNow: 'Buy Now',
      pricingPages: {
        dynamic: {
          title: 'Dynamic Residential IPv6 Proxy',
          subtitle: 'Real residential IPs, massive IP pool, pay-as-you-go, flexible and efficient',
          featureCards: {
          global: {
            title: 'Global Coverage',
            description: 'Covering 50+ countries and regions, providing real residential IPs with maximum anonymity',
          },
          flexible: {
            title: 'Flexible Billing',
            description: 'Pay only for the traffic you actually use, no payment for idle resources',
          },
          unlimited: {
            title: 'Unlimited Concurrent',
            description: 'No limit on concurrent connections, scale your data collection freely',
          },
        },
        plansTitle: 'Choose Your Plan',
        plansSubtitle: 'All plans include full features, only traffic quota differs',
        plans: {
          starter: {
            name: 'Starter',
            traffic: '10 GB',
            price: '$35',
            period: '/month',
            pricePerGB: '$3.5/GB',
            description: 'Suitable for small-scale data collection projects',
            features: [
              '10GB monthly traffic',
              '50+ countries worldwide',
              'Unlimited concurrent connections',
              'HTTP/HTTPS/SOCKS5',
              'Email support',
              '99.9% uptime',
            ],
          },
          professional: {
            name: 'Professional',
            traffic: '50 GB',
            price: '$150',
            period: '/month',
            pricePerGB: '$3.0/GB',
            description: 'Suitable for medium-sized enterprises with continuous data needs',
            popular: 'Most Popular',
            features: [
              '50GB monthly traffic',
              '50+ countries worldwide',
              'Unlimited concurrent connections',
              'HTTP/HTTPS/SOCKS5',
              'Priority technical support',
              '99.9% uptime',
              'Custom whitelist',
            ],
          },
          enterprise: {
            name: 'Enterprise',
            traffic: '200 GB',
            price: '$480',
            period: '/month',
            pricePerGB: '$2.4/GB',
            description: 'Suitable for large-scale data collection needs',
            features: [
              '200GB monthly traffic',
              '50+ countries worldwide',
              'Unlimited concurrent connections',
              'HTTP/HTTPS/SOCKS5',
              '7×24 dedicated support',
              '99.99% uptime',
              'Custom whitelist',
              'Dedicated account manager',
            ],
          },
        },
        selectPlan: 'Select Plan',
        needMore: 'Need More Traffic?',
        contactSales: 'Contact Sales',
        customPlan: 'Contact us for customized enterprise plans with better pricing',
        faq: {
          title: 'Frequently Asked Questions',
          q1: {
            question: 'How is traffic calculated?',
            answer: 'Traffic is calculated based on actual usage, including the total data of requests and responses. Unused traffic will not be carried over to the next month.',
          },
          q2: {
            question: 'What protocols are supported?',
            answer: 'We support HTTP, HTTPS, and SOCKS5 protocols to meet the needs of various application scenarios.',
          },
          q3: {
            question: 'How to set up IP whitelist?',
            answer: 'After logging into the control panel, you can add authorized IP whitelist on the "Proxy Settings" page, supporting up to 100 IP addresses.',
          },
          q4: {
            question: 'Can I switch regions?',
            answer: 'Yes, you can freely switch between 50+ countries and regions, and specify different target regions for each request.',
          },
        },
      },
      static: {
        title: 'Static Residential IPv6 Proxy',
        subtitle: 'Fixed residential IP address, long-term stability, suitable for scenarios requiring continuous use of the same IP',
        featureCards: {
          stable: {
            title: 'Long-term Stability',
            description: 'Fixed IP address, remains unchanged during rental period, ensuring business continuity',
          },
          dedicated: {
            title: 'Dedicated and Exclusive',
            description: 'Each IP is assigned to only one user, ensuring optimal performance and security',
          },
          residential: {
            title: 'Real Residential',
            description: '100% real residential IPs from ISP allocation, with highest credibility',
          },
        },
        period: {
          label: 'Select Rental Period',
          title: 'Flexible Billing Periods',
          description: 'Choose the billing period that suits you best - longer periods offer better value',
          prefix: 'By',
          day: 'Daily',
          week: 'Weekly',
          month: 'Monthly',
          year: 'Yearly',
        },
        table: {
          ipCount: 'IP Count',
          dailyPrice: 'Daily Price',
          weeklyPrice: 'Weekly Price',
          monthlyPrice: 'Monthly Price',
          yearlyPrice: 'Annual Price',
          selectButton: 'Select',
          perIp: '/IP',
          perDay: '/Day',
        },
        plans: {
          single: {
            name: '1 IP',
          },
          small: {
            name: '5 IPs',
          },
          medium: {
            name: '10 IPs',
          },
          large: {
            name: '50 IPs',
          },
        },
        features: {
          title: 'All Plans Include',
          list: [
            '100% Real residential IPs',
            'HTTP/HTTPS/SOCKS5 protocols',
            'Unlimited bandwidth',
            '99.9% uptime guarantee',
            '24/7 technical support',
            'Free region switching',
          ],
        },
        needMore: 'Need More IPs?',
        contactSales: 'Contact Sales Team',
        customSolution: 'Get customized enterprise solution',
        faq: {
          title: 'Frequently Asked Questions',
          q1: {
            question: 'What is the difference between static IP and dynamic IP?',
            answer: 'Static IP remains unchanged during the rental period, suitable for scenarios requiring long-term use of the same IP; dynamic IP may change with each request, pay-per-traffic billing is more flexible.',
          },
          q2: {
            question: 'What happens after the rental period expires?',
            answer: 'IPs will be automatically released after expiration. If you need to continue using them, please renew before expiration, and we will try our best to keep the same IP addresses for you.',
          },
          q3: {
            question: 'Can I choose the geographic location of IPs?',
            answer: 'Yes, we support 50+ countries and regions, and you can select the desired geographic location when ordering.',
          },
          q4: {
            question: 'What is the bandwidth limit?',
            answer: 'All plans provide unlimited bandwidth, but we recommend reasonable use to ensure optimal performance and service quality.',
          },
        },
      },
      datacenter: {
        title: 'Datacenter IPv6 Proxy',
        subtitle: 'High-performance datacenter IP, ultra-high speed, best value choice',
        featureCards: {
          affordable: {
            title: 'Best Value',
            description: 'More affordable than residential IPs, suitable for budget-conscious projects',
          },
          ultraFast: {
            title: 'Ultra-Fast Speed',
            description: 'Datacenter-grade bandwidth, 3-5x faster than residential IPs',
          },
          reliable: {
            title: 'Stable & Reliable',
            description: 'Enterprise-grade datacenter, 99.99% uptime guarantee',
          },
        },
        savingBanner: {
          title: 'Save 60% Compared to Residential IPs',
          description: 'Significantly reduce your costs while maintaining performance',
        },
        period: {
          label: 'Select Rental Period',
          title: 'Flexible Billing Periods',
          description: 'Choose the billing period that suits you best - longer periods offer better value',
          prefix: 'By',
          day: 'Daily',
          week: 'Weekly',
          month: 'Monthly',
          year: 'Yearly',
        },
        table: {
          ipCount: 'IP Count',
          dailyPrice: 'Daily Price',
          weeklyPrice: 'Weekly Price',
          monthlyPrice: 'Monthly Price',
          yearlyPrice: 'Annual Price',
          selectButton: 'Select',
          perIp: '/IP',
          perDay: '/Day',
        },
        plans: {
          single: {
            name: '1 IP',
          },
          small: {
            name: '5 IPs',
          },
          medium: {
            name: '10 IPs',
          },
          large: {
            name: '50 IPs',
          },
        },
        comparison: {
          title: 'Datacenter vs Residential Proxy Comparison',
          headers: {
            feature: 'Feature',
            datacenter: 'Datacenter IPv6',
            residential: 'Residential IPv6',
          },
          rows: {
            price: {
              label: 'Price',
              datacenter: '60%+ Cheaper',
              residential: 'More Expensive',
            },
            speed: {
              label: 'Speed',
              datacenter: 'Ultra Fast (1Gbps+)',
              residential: 'Medium',
            },
            stability: {
              label: 'Stability',
              datacenter: '99.99%',
              residential: '99.9%',
            },
            anonymity: {
              label: 'Anonymity',
              datacenter: 'Medium',
              residential: 'Extremely High',
            },
            useCase: {
              label: 'Use Cases',
              datacenter: 'API Access, SEO',
              residential: 'Social Media, E-commerce',
            },
          },
        },
        features: {
          title: 'All Plans Include',
          list: [
            'Enterprise-grade datacenter',
            'HTTP/HTTPS/SOCKS5 protocols',
            'Unlimited bandwidth',
            '99.99% uptime guarantee',
            '24/7 technical support',
            'Instant activation',
          ],
        },
        needMore: 'Need More IPs?',
        contactSales: 'Contact Sales Team',
        customSolution: 'Get customized enterprise solution',
        faq: {
          title: 'Frequently Asked Questions',
          q1: {
            question: 'What scenarios are datacenter IPs suitable for?',
            answer: 'Datacenter IPs are particularly suitable for SEO monitoring, price monitoring, data scraping, and other scenarios that require high speed but are not strict about IP source.',
          },
          q2: {
            question: 'Why are datacenter IPs cheaper?',
            answer: 'Datacenter IPs come from professional data centers with lower costs and sufficient supply, so the price is more favorable. However, their IP characteristics are more obvious and may be recognized by some websites.',
          },
          q3: {
            question: 'Will datacenter IPs be banned?',
            answer: 'Although datacenter IPs are easier to identify, they are still effective for most websites and application scenarios. If the target website is sensitive to IP sources, it is recommended to use residential IPs.',
          },
          q4: {
            question: 'Can I mix datacenter and residential IPs?',
            answer: 'Of course! Many customers choose different types of IPs based on different scenarios, ensuring performance while controlling costs.',
          },
        },
      },
    },
    },
    login: {
      title: 'Login to Your Account',
      or: 'or',
      registerLink: 'register a new account',
      email: 'Email Address',
      password: 'Password',
      rememberMe: 'Remember me',
      forgotPassword: 'Forgot password?',
      loginButton: 'Login',
      alternativeLogin: 'Or login with',
    },
    register: {
      title: 'Create Your Account',
      or: 'or',
      loginLink: 'login to existing account',
      email: 'Email Address',
      company: 'Company Name (Optional)',
      password: 'Password',
      confirmPassword: 'Confirm Password',
      agree: 'I agree to the',
      terms: 'Terms of Service',
      and: 'and',
      privacy: 'Privacy Policy',
      registerButton: 'Register Now',
    },
    support: {
      title: 'Customer Support',
      subtitle: 'We\'re here to help you',
      contact: {
        title: 'Contact Us',
        name: 'Name',
        email: 'Email',
        subject: 'Subject',
        message: 'Message',
        send: 'Send Message',
      },
      faq: {
        title: 'Frequently Asked Questions',
        viewAll: 'View All',
      },
    },
    common: {
      loading: 'Loading...',
      error: 'Error',
      success: 'Success',
      cancel: 'Cancel',
      confirm: 'Confirm',
      save: 'Save',
      delete: 'Delete',
      edit: 'Edit',
      close: 'Close',
    },
    documentation: {
      title: 'kernelProxy Documentation Center',
      subtitle: 'Learn how to use our API and services, quickly integrate into your application',
      searchPlaceholder: 'Search documentation...',
      sidebar: {
        gettingStarted: 'Getting Started',
        quickStart: 'Quick Start',
        authentication: 'Authentication',
        proxyTypes: 'Proxy Types',
        apiReference: 'API Reference',
        getProxy: 'Get Proxy',
        listProxies: 'List Proxies',
        validateProxy: 'Validate Proxy',
        guides: 'Guides',
        bestPractices: 'Best Practices',
        errorHandling: 'Error Handling',
        rateLimiting: 'Rate Limiting',
        sdks: 'SDKs',
        javascript: 'JavaScript',
        python: 'Python',
        java: 'Java',
      },
    },
    blog: {
      title: 'kernelProxy Blog',
      subtitle: 'Technical insights, product updates, and industry trends',
      readMore: 'Read More',
      latestPosts: 'Latest Posts',
      categories: 'Categories',
      allPosts: 'All Posts',
    },
    dashboard: {
      title: 'Dashboard',
      overview: 'Overview',
      proxyManagement: 'Proxy Management',
      statistics: 'Usage Statistics',
      apiSettings: 'API Settings',
      billing: 'Billing',
      support: 'Support',
    },
    footer: {
      description: 'High-performance IPv6-based proxy service',
      products: 'Products',
      company: 'Company',
      contactUs: 'Contact Us',
      allRightsReserved: 'All rights reserved.',
    },
  },
  'zh-CN': {
    nav: {
      products: '产品',
      pricing: '定价',
      documentation: '文档',
      blog: '博客',
      support: '支持',
      login: '登录',
      register: '注册',
      pricingMenu: {
        dynamic: {
          title: '动态住宅IPv6',
          subtitle: '按流量计费',
        },
        static: {
          title: '静态住宅IPv6',
          subtitle: '按IP数量和时长',
        },
        datacenter: {
          title: '数据中心IPv6',
          subtitle: '高性价比选择',
        },
      },
    },
    products: {
      hero: {
        title: '满足各种需求的IPv6代理解决方案',
        subtitle: '从我们全面的IPv6代理服务中选择，为不同的使用场景和预算要求量身定制'
      },
      'dynamic-residential': {
        title: '动态住宅IPv6',
        description: '自动轮换的住宅IP，提供最大匿名性和成功率。非常适合大规模数据采集和网页抓取。',
        features: [
          '真实住宅IP地址',
          '自动IP轮换',
          '高成功率 (>95%)',
          '覆盖全球50+国家',
          '按流量付费'
        ],
        useCases: [
          '网页抓取',
          '价格监控',
          '广告验证',
          '市场调研'
        ]
      },
      'static-residential': {
        title: '静态住宅IPv6',
        description: '长期稳定的固定住宅IP。非常适合账号管理和需要一致IP地址的服务。',
        features: [
          '专用住宅IP',
          '长期稳定IP',
          '高信任度',
          '会话持久性',
          '灵活租用期限'
        ],
        useCases: [
          '账号管理',
          '社交媒体',
          '电子商务',
          '品牌保护'
        ]
      },
      datacenter: {
        title: '数据中心IPv6',
        description: '高速数据中心IP，性价比极佳。最适合需要高带宽和速度的任务。',
        features: [
          '超快连接速度',
          '无限带宽',
          '性价比高',
          '高并发连接',
          '99.9%正常运行时间保证'
        ],
        useCases: [
          'SEO监控',
          '内容分发',
          'API测试',
          '批量操作'
        ]
      },
      useCases: '使用场景',
      viewPricing: '查看定价',
      comparison: {
        title: '产品对比',
        subtitle: '找到最适合您需求的解决方案',
        feature: '功能特性',
        rows: [
          { feature: 'IP类型', dynamic: '住宅', static: '住宅', datacenter: '数据中心' },
          { feature: 'IP轮换', dynamic: '自动轮换', static: '固定', datacenter: '固定' },
          { feature: '计费模式', dynamic: '按流量', static: '按IP和时长', datacenter: '按IP和时长' },
          { feature: '成功率', dynamic: '>95%', static: '>98%', datacenter: '>90%' },
          { feature: '速度', dynamic: '中等', static: '中等', datacenter: '极快' },
          { feature: '全球覆盖', dynamic: true, static: true, datacenter: true },
          { feature: '并发会话', dynamic: '高', static: '中', datacenter: '极高' },
          { feature: '价格', dynamic: '高端', static: '高', datacenter: '实惠' }
        ]
      },
      cta: {
        title: '准备好开始了吗？',
        subtitle: '选择适合您需求的方案，立即开始使用我们的优质IPv6代理网络',
        getStarted: '免费开始',
        contactSales: '联系销售'
      },
      dynamicResidential: {
        title: '动态住宅IPv6'
      },
      staticResidential: {
        title: '静态住宅IPv6'
      }
    },
    home: {
      hero: {
        title: {
          line1: '内核级性能，',
          line2: '释放IPv6无限潜力'
        },
        subtitle: '基于纯IPv6骨干网构建，提供稳定、高速、匿名的代理服务，专为数据采集、SEO监控和广告验证优化。',
        getStarted: '立即开始',
        viewPricing: '查看定价',
      },
      stats: {
        proxyIPs: '在线代理IP数量',
        countries: '覆盖国家/地区',
        bandwidth: '今日带宽消耗',
      },
      features: {
        title: '为什么选择 kernelProxy',
        subtitle: '我们的代理服务以卓越性能和可靠性著称，为企业级数据需求提供强大支持',
        global: {
          title: '全球覆盖',
          description: '遍布50+国家的IPv6原生网络，为您提供全球任意地区的代理服务',
        },
        performance: {
          title: '极致性能',
          description: '内核级优化，毫秒级响应，99.9%可用性保障，为您的业务提供稳定支持',
        },
        easeOfUse: {
          title: '简单易用',
          description: '直观的控制面板和完整的API文档，让您轻松集成和管理代理资源',
        },
      },
      useCases: {
        title: '应用场景',
        subtitle: 'kernelProxy 适用于多种业务场景',
        dataCollection: {
          title: '数据采集',
          items: [
            '电商价格监控',
            '社交媒体数据分析',
            '市场调研',
            '竞品分析',
          ],
        },
        seo: {
          title: 'SEO监控',
          items: [
            '搜索引擎排名',
            '排名追踪',
            '本地化搜索结果分析',
            '竞争对手监控',
          ],
        },
        adVerification: {
          title: '广告验证',
          items: [
            '广告展示验证',
            '不同地区广告内容检查',
            '竞争对手广告策略分析',
          ],
        },
      },
      testimonials: {
        title: '客户评价',
        subtitle: '了解我们的客户如何使用 kernelProxy 提升业务效率',
        customer1: {
          name: '张先生',
          position: '数据分析公司 CTO',
          review: 'kernelProxy 的稳定性令人印象深刻。在过去六个月中，我们使用它进行了超过5亿次数据请求，几乎没有遇到任何问题。IPv6的广泛覆盖也为我们的全球数据采集提供了极大便利。',
        },
        customer2: {
          name: '李女士',
          position: 'SEO咨询顾问',
          review: '作为SEO顾问，我需要从不同地区查看客户的搜索排名。kernelProxy 提供的地理定位代理让我能够准确查看不同市场的搜索结果，API也非常易于集成到我们的监控工具中。',
        },
      },
      cta: {
        title: '准备好开始使用了吗？',
        subtitle: '注册账户，获取10个免费代理IP，体验kernelProxy的强大性能',
        freeTrial: '免费试用',
        viewPlans: '查看套餐详情',
      },
    },
    pricing: {
      title: '简单透明的定价方案',
      subtitle: '根据您的业务需求选择最合适的套餐，无隐藏费用',
      billingTypes: {
        traffic: '按流量计费',
        ip: '按IP数量计费',
        enterprise: '企业定制',
      },
      plans: {
        basic: {
          name: '基础版',
          price: '¥149',
          period: '/月',
          description: '适合小型数据采集需求',
          features: [
            '100GB 月流量',
            '10个并发连接',
            '20个国家/地区',
            '基础API访问',
            '邮件支持',
          ],
        },
        pro: {
          name: '专业版',
          price: '¥499',
          period: '/月',
          description: '适合中型企业和持续数据需求',
          popular: '最受欢迎',
          features: [
            '500GB 月流量',
            '50个并发连接',
            '所有国家/地区',
            '完整API访问',
            '优先邮件支持',
          ],
        },
        business: {
          name: '商业版',
          price: '¥1499',
          period: '/月',
          description: '适合大规模数据采集需求',
          features: [
            '2TB 月流量',
            '200个并发连接',
            '所有国家/地区',
            '完整API访问',
            '7x24小时优先支持',
          ],
        },
      },
      selectPlan: '选择套餐',
      recommended: '推荐',
      buyNow: '立即购买',
      pricingPages: {
        dynamic: {
          title: '动态住宅 IPv6 代理',
          subtitle: '按流量计费，灵活高效，适合各种规模的数据采集需求',
          featureCards: {
            global: {
              title: '全球覆盖',
              description: '覆盖50+个国家和地区，提供真实住宅IP，确保最高匿名性',
            },
            flexible: {
              title: '灵活计费',
              description: '只为您实际使用的流量付费，无需为闲置资源买单',
            },
            unlimited: {
              title: '无限并发',
              description: '不限制并发连接数，随意扩展您的数据采集规模',
            },
          },
          plansTitle: '选择适合您的套餐',
          plansSubtitle: '所有套餐均包含完整功能，仅流量配额不同',
          plans: {
            starter: {
              name: '入门版',
              traffic: '10GB 流量',
              price: '¥35',
              period: '/月',
              pricePerGB: '¥3.5/GB',
              description: '适合小规模数据采集项目',
              features: [
                '10GB 月流量',
                '全球50+国家',
                '无限并发连接',
                'HTTP/HTTPS/SOCKS5',
                '邮件支持',
                '99.9%在线率',
              ],
            },
            professional: {
              name: '专业版',
              traffic: '50GB 流量',
              price: '¥150',
              period: '/月',
              pricePerGB: '¥3.0/GB',
              description: '适合中型企业持续数据需求',
              popular: '最受欢迎',
              features: [
                '50GB 月流量',
                '全球50+国家',
                '无限并发连接',
                'HTTP/HTTPS/SOCKS5',
                '优先技术支持',
                '99.9%在线率',
                '自定义白名单',
              ],
            },
            enterprise: {
              name: '企业版',
              traffic: '200GB 流量',
              price: '¥480',
              period: '/月',
              pricePerGB: '¥2.4/GB',
              description: '适合大规模数据采集需求',
              features: [
                '200GB 月流量',
                '全球50+国家',
                '无限并发连接',
                'HTTP/HTTPS/SOCKS5',
                '7×24小时专属支持',
                '99.99%在线率',
                '自定义白名单',
                '专属账户经理',
              ],
            },
          },
          selectPlan: '选择套餐',
          needMore: '需要更多流量？',
          contactSales: '联系销售',
          customPlan: '定制专属方案',
          faq: {
            title: '常见问题',
            q1: {
              question: '流量如何计算？',
              answer: '流量按照实际使用量计算，包括请求和响应的数据总和。未使用的流量不会结转到下个月。',
            },
            q2: {
              question: '支持哪些协议？',
              answer: '我们支持 HTTP、HTTPS 和 SOCKS5 协议，可以满足各种应用场景的需求。',
            },
            q3: {
              question: '如何设置IP白名单？',
              answer: '登录控制面板后，在"代理设置"页面可以添加授权IP白名单，最多支持100个IP地址。',
            },
            q4: {
              question: '可以切换地区吗？',
              answer: '是的，您可以在50+个国家和地区之间自由切换，每次请求都可以指定不同的目标地区。',
            },
          },
        },
        static: {
          title: '静态住宅 IPv6 代理',
          subtitle: '固定住宅IP地址，长期稳定，适合需要持续使用同一IP的场景',
          featureCards: {
            stable: {
              title: '长期稳定',
              description: '固定IP地址，在租用期内保持不变，确保业务连续性',
            },
            dedicated: {
              title: '专属独享',
              description: '每个IP仅分配给一个用户，保证最佳性能和安全性',
            },
            residential: {
              title: '真实住宅',
              description: '100%真实住宅IP，来自ISP分配，具有最高可信度',
            },
          },
          period: {
            label: '选择租用周期',
            title: '灵活的计费周期',
            description: '选择最适合您的计费周期，周期越长价格越优惠',
            prefix: '按',
            day: '天',
            week: '周',
            month: '月',
            year: '年',
          },
          table: {
            ipCount: 'IP数量',
            dailyPrice: '每日价格',
            weeklyPrice: '每周价格',
            monthlyPrice: '每月价格',
            yearlyPrice: '年度价格',
            selectButton: '选择',
            perIp: '/IP',
            perDay: '/天',
          },
          plans: {
            single: {
              name: '1个IP',
            },
            small: {
              name: '5个IP',
            },
            medium: {
              name: '10个IP',
            },
            large: {
              name: '50个IP',
            },
          },
          features: {
            title: '所有套餐包含',
            list: [
              '100% 真实住宅IP',
              'HTTP/HTTPS/SOCKS5协议',
              '无限带宽',
              '99.9%在线率保证',
              '24/7技术支持',
              '自由更换地区',
            ],
          },
          needMore: '需要更多IP？',
          contactSales: '联系销售团队',
          customSolution: '获取企业定制方案',
          faq: {
            title: '常见问题',
            q1: {
              question: '静态IP和动态IP有什么区别？',
              answer: '静态IP在租用期内保持不变，适合需要长期使用同一IP的场景；动态IP每次请求可能变化，按流量计费更灵活。',
            },
            q2: {
              question: '租用期到期后会怎样？',
              answer: 'IP将在到期后自动释放。如需继续使用，请在到期前续费，我们会尽力为您保留相同的IP地址。',
            },
            q3: {
              question: '可以选择IP的地理位置吗？',
              answer: '是的，我们支持50+个国家和地区，您可以在订购时选择所需的地理位置。',
            },
            q4: {
              question: '带宽限制是多少？',
              answer: '所有套餐都提供无限带宽，但我们建议合理使用以确保最佳性能和服务质量。',
            },
          },
        },
        datacenter: {
          title: '数据中心 IPv6 代理',
          subtitle: '高性能数据中心IP，超高速度，性价比之选',
          featureCards: {
            affordable: {
              title: '超高性价比',
              description: '价格比住宅IP更实惠，适合预算有限的项目',
            },
            ultraFast: {
              title: '极速性能',
              description: '数据中心级别带宽，速度是住宅IP的3-5倍',
            },
            reliable: {
              title: '稳定可靠',
              description: '企业级数据中心，99.99%在线率保证',
            },
          },
          savingBanner: {
            title: '相比住宅IP节省60%',
            description: '在保证性能的同时，大幅降低您的成本',
          },
          period: {
            label: '选择租用周期',
            title: '灵活的计费周期',
            description: '选择最适合您的计费周期，周期越长价格越优惠',
            prefix: '按',
            day: '天',
            week: '周',
            month: '月',
            year: '年',
          },
          table: {
            ipCount: 'IP数量',
            dailyPrice: '每日价格',
            weeklyPrice: '每周价格',
            monthlyPrice: '每月价格',
            yearlyPrice: '年度价格',
            selectButton: '选择',
            perIp: '/IP',
            perDay: '/天',
          },
          plans: {
            single: {
              name: '1个IP',
            },
            small: {
              name: '5个IP',
            },
            medium: {
              name: '10个IP',
            },
            large: {
              name: '50个IP',
            },
          },
          comparison: {
            title: '数据中心 vs 住宅代理对比',
            headers: {
              feature: '特性',
              datacenter: '数据中心IPv6',
              residential: '住宅IPv6',
            },
            rows: {
              price: {
                label: '价格',
                datacenter: '便宜60%+',
                residential: '较贵',
              },
              speed: {
                label: '速度',
                datacenter: '超快 (1Gbps+)',
                residential: '中等',
              },
              stability: {
                label: '稳定性',
                datacenter: '99.99%',
                residential: '99.9%',
              },
              anonymity: {
                label: '匿名性',
                datacenter: '中等',
                residential: '极高',
              },
              useCase: {
                label: '适用场景',
                datacenter: 'API访问、SEO',
                residential: '社交媒体、电商',
              },
            },
          },
          features: {
            title: '所有套餐包含',
            list: [
              '企业级数据中心',
              'HTTP/HTTPS/SOCKS5协议',
              '无限带宽',
              '99.99%在线率保证',
              '24/7技术支持',
              '即时激活',
            ],
          },
          needMore: '需要更多IP？',
          contactSales: '联系销售团队',
          customSolution: '获取企业定制方案',
          faq: {
            title: '常见问题',
            q1: {
              question: '数据中心IP适合什么场景？',
              answer: '数据中心IP特别适合SEO监控、价格监控、数据抓取等对速度要求高但对IP来源要求不严格的场景。',
            },
            q2: {
              question: '为什么数据中心IP更便宜？',
              answer: '数据中心IP来自专业机房，成本较低且供应充足，因此价格更优惠。但其IP特征较明显，某些网站可能会识别。',
            },
            q3: {
              question: '数据中心IP会被封禁吗？',
              answer: '虽然数据中心IP较容易被识别，但对于大多数网站和应用场景仍然有效。如果目标网站对IP来源敏感，建议使用住宅IP。',
            },
            q4: {
              question: '可以混合使用数据中心和住宅IP吗？',
              answer: '当然可以！很多客户会根据不同场景选择不同类型的IP，既保证性能又控制成本。',
            },
          },
        },
      },
    },
    login: {
      title: '登录您的账户',
      or: '或',
      registerLink: '注册新账户',
      email: '邮箱地址',
      password: '密码',
      rememberMe: '记住我',
      forgotPassword: '忘记密码?',
      loginButton: '登录',
      alternativeLogin: '或通过以下方式登录',
    },
    register: {
      title: '创建您的账户',
      or: '或',
      loginLink: '登录已有账户',
      email: '邮箱地址',
      company: '公司名称（可选）',
      password: '密码',
      confirmPassword: '确认密码',
      agree: '我同意',
      terms: '服务条款',
      and: '和',
      privacy: '隐私政策',
      registerButton: '立即注册',
    },
    support: {
      title: '客户支持',
      subtitle: '我们随时为您提供帮助',
      contact: {
        title: '联系我们',
        name: '姓名',
        email: '邮箱',
        subject: '主题',
        message: '消息',
        send: '发送消息',
      },
      faq: {
        title: '常见问题',
        viewAll: '查看全部',
      },
    },
    common: {
      loading: '加载中...',
      error: '错误',
      success: '成功',
      cancel: '取消',
      confirm: '确认',
      save: '保存',
      delete: '删除',
      edit: '编辑',
      close: '关闭',
    },
    documentation: {
      title: 'kernelProxy 文档中心',
      subtitle: '了解如何使用我们的API和服务，快速集成到您的应用中',
      searchPlaceholder: '搜索文档...',
      sidebar: {
        gettingStarted: '入门指南',
        quickStart: '快速开始',
        authentication: '认证',
        proxyTypes: '代理类型',
        apiReference: 'API 参考',
        getProxy: '获取代理',
        listProxies: '列出代理',
        validateProxy: '验证代理',
        guides: '指南',
        bestPractices: '最佳实践',
        errorHandling: '错误处理',
        rateLimiting: '速率限制',
        sdks: 'SDK',
        javascript: 'JavaScript',
        python: 'Python',
        java: 'Java',
      },
    },
    blog: {
      title: 'kernelProxy 博客',
      subtitle: '技术洞察、产品更新和行业动态',
      readMore: '阅读全文',
      latestPosts: '最新文章',
      categories: '分类',
      allPosts: '所有文章',
    },
    dashboard: {
      title: '控制面板',
      overview: '概览',
      proxyManagement: '代理管理',
      statistics: '使用统计',
      apiSettings: 'API设置',
      billing: '账单',
      support: '支持',
    },
    footer: {
      description: '基于IPv6的高性能代理服务',
      products: '产品',
      company: '公司',
      contactUs: '联系我们',
      allRightsReserved: '版权所有',
    },
  },
};
